<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
</head>

<body>
    <table width="100%" border="1" class="table table-bordered">
        <tbody>
          <tr>
            <td width="15%"  align="right">题目</td>
            <td>
            <?php
                $QuestionService=new service\services\QuestionService();
                $QuestionService=$QuestionService->getQuestionById($data['question_id']);
                if(isset($QuestionService['content']))echo strip_tags(htmlspecialchars_decode($QuestionService['content']));
            ?>
            </td>
          </tr>
          <tr>
            <td align="right">学生答案</td>
            <td><?php echo str_replace('"','',str_replace('###', ' ', $data['user_answer'])); ?> <?php if($data['user_answer']==false)echo "你没有作答";  ?></td>
          </tr>
          <tr>
            <td align="right">正确答案</td>
            <td>
            <?php
                $right_answer=json_decode($data['right_answer'], true);
                if(is_array($right_answer)){
                    foreach($right_answer as $kk=>$vv){
                        if(is_array($vv)){
                            echo $vv[0].' ';
                        }else{
                            echo $vv.' ';
                        }
                    }
                }else{
                    echo str_replace('"', "", $data['right_answer']);
                }
                ?>
            </td>
          </tr>
          <tr>
            <td align="right">试题解析</td>
            <td>{if condition="isset($QuestionService['analyze_text'])"}{$QuestionService.analyze_text|htmlspecialchars_decode}{/if}</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </tbody>
      </table>
</body>
</html>
